package entity;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Francis
 */
@Entity
@Table(name = "video_type")
@NamedQueries({@NamedQuery(name = "Video.findByVideoID", query = "SELECT v FROM Video v WHERE v.videoID = :videoID"), @NamedQuery(name = "Video.findByName", query = "SELECT v FROM Video v WHERE v.name = :name"), @NamedQuery(name = "Video.findByActor", query = "SELECT v FROM Video v WHERE v.actor = :actor"), @NamedQuery(name = "Video.findByLangauge", query = "SELECT v FROM Video v WHERE v.langauge = :langauge"), @NamedQuery(name = "Video.findByYear", query = "SELECT v FROM Video v WHERE v.year = :year"), @NamedQuery(name = "Video.findByPersonID", query = "SELECT v FROM Video v WHERE v.personID = :personID"), @NamedQuery(name = "Video.findByDescription", query = "SELECT v FROM Video v WHERE v.description = :description"), @NamedQuery(name = "Video.findByPrice", query = "SELECT v FROM Video v WHERE v.price = :price"), @NamedQuery(name = "Video.findByQuantity", query = "SELECT v FROM Video v WHERE v.quantity = :quantity"), @NamedQuery(name = "Video.findByStatusCode", query = "SELECT v FROM Video v WHERE v.statusCode = :statusCode"), @NamedQuery(name = "Video.findByLocation", query = "SELECT v FROM Video v WHERE v.location = :location"), @NamedQuery(name = "Video.findByImage1", query = "SELECT v FROM Video v WHERE v.image1 = :image1"), @NamedQuery(name = "Video.findByImage2", query = "SELECT v FROM Video v WHERE v.image2 = :image2"), @NamedQuery(name = "Video.findByImage3", query = "SELECT v FROM Video v WHERE v.image3 = :image3")})
public class Video implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "videoID", nullable = false)
    private Integer videoID;
    @Column(name = "name", nullable = false)
    private String name;
    @Column(name = "actor")
    private String actor;
    @Column(name = "langauge")
    private String langauge;
    @Column(name = "year")
    private Integer year;
    @Column(name = "personID", nullable = false)
    private int personID;
    @Column(name = "description")
    private String description;
    @Column(name = "price")
    private BigDecimal price;
    @Column(name = "quantity")
    private Integer quantity;
    @Column(name = "statusCode")
    private Integer statusCode;
    @Column(name = "location")
    private String location;
    @Column(name = "image1")
    private String image1;
    @Column(name = "image2")
    private String image2;
    @Column(name = "image3")
    private String image3;

    public Video() {
    }

    public Video(Integer videoID) {
        this.videoID = videoID;
    }

    public Video(Integer videoID, String name, int personID) {
        this.videoID = videoID;
        this.name = name;
        this.personID = personID;
    }

    public Integer getVideoID() {
        return videoID;
    }

    public void setVideoID(Integer videoID) {
        this.videoID = videoID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getActor() {
        return actor;
    }

    public void setActor(String actor) {
        this.actor = actor;
    }

    public String getLangauge() {
        return langauge;
    }

    public void setLangauge(String langauge) {
        this.langauge = langauge;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    public int getPersonID() {
        return personID;
    }

    public void setPersonID(int personID) {
        this.personID = personID;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(Integer statusCode) {
        this.statusCode = statusCode;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getImage1() {
        return image1;
    }

    public void setImage1(String image1) {
        this.image1 = image1;
    }

    public String getImage2() {
        return image2;
    }

    public void setImage2(String image2) {
        this.image2 = image2;
    }

    public String getImage3() {
        return image3;
    }

    public void setImage3(String image3) {
        this.image3 = image3;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (videoID != null ? videoID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Video)) {
            return false;
        }
        Video other = (Video) object;
        if ((this.videoID == null && other.videoID != null) || (this.videoID != null && !this.videoID.equals(other.videoID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.Video[videoID=" + videoID + "]";
    }

}
